package com.campus;

/**
 * @desc:
 * @author: Shoko
 * @date: 2025/3/4
 */
public class Main {
    public static void main(String[] args) {
        // 创建一个 Rectangle 对象
        Shape rectangle = new Rectangle(5, 10);
        DataOperator dataOperator = new DataOperator(rectangle);
        System.out.println("Rectangle Area: " + dataOperator.getArea());
        System.out.println("Rectangle Perimeter: " + dataOperator.getPerimeter());

        // 创建一个 Square 对象
        Shape square = new Square(4);
        dataOperator = new DataOperator(square);
        System.out.println("Square Area: " + dataOperator.getArea());
        System.out.println("Square Perimeter: " + dataOperator.getPerimeter());
    }
}
